<?php
class CategoryDAO extends My_DAO
{
	/** Table name */
	protected $_name    = 'category';
	
	public function buildQueryData($orderBy = "", $orderDirection="",
	$key = "", $field = "", $params = null)
	{
		$select = parent::buildQueryData($orderBy, $orderDirection,$key,$field);
		$languageId = My_Translate::getLanguage();
		$select->where('languageId = '.$languageId);
		return $select;
	}
	
	public function loadCol($column)
	{
		$langId = My_Translate::getLanguage();
		return $this->getAdapter()->fetchCol("select $column from category where languageId=$langId");
	}
}
